package em.util;

/*
 * 对于微信开发所用的全部常量
 */
public class ConstUtil {

	/**
	 * 生成随机字符所需要的字节
	 */
	public static final String C_RANDOM = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";

	/**
	 * 最新微信菜单
	 */
	public static final String U_CREATE_MENU_URL="{ 'button':[ {"
			+ " 'name':'设备信息平台',"
			+ " 'type':'view', "
			+ " 'url': 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf79990e0f7f992ab&redirect_uri=http%3a%2f%2fapp.hchn.com%2fsvr%2fgetMenuUrl.json&response_type=code&scope=snsapi_userinfo&state=index#wechat_redirect'"
			+ " },{"
			+ " 'name':'关于',"
			+ " 'sub_button':[{"
			+ " 'type': 'view',"
			+ " 'name': '帐号绑定',"
			+ " 'url': 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf79990e0f7f992ab&redirect_uri=http%3a%2f%2fapp.hchn.com%fsvr%2fgetMenuUrl.json&response_type=code&scope=snsapi_userinfo&state=load#wechat_redirect'"
			+ " }]}]}";

	/**
	 * 字符编码 UTF-8
	 */
	public static final String ENCODING_UTF_8="UTF-8";

	/**
	 * 字符编码 GBK
	 */
	public static final String ENCODING_GBK="GBK";

	/**
	 * 七牛云中图片的url
	 */
	public static final String IMG_URL="https://app2.hchn.com/";
//------------------------------------------------------------------------------------------------------------------------------------------------
	/**
	 * 终端升级包文件路径
	 */
	public static final String UPDATA_TERM_URL="term/";
	
	/**
	 *员工批量导入      
	 */  
	public static final String EXECL_EMP_TITLE="{ \"0\":{\"titlename\":\"员工名\",\"dbfield\":\"Name\",\"dbtype\":\"string\",\"dblength\":20,\"isnull\":0},"
												+ " \"1\":{\"titlename\":\"员工编号\",\"dbfield\":\"EmpCode\",\"dbtype\":\"string\",\"dblength\":20,\"isnull\":0},"
												+ " \"2\":{\"titlename\":\"身份证\",\"dbfield\":\"IdCard\",\"dbtype\":\"string\",\"dblength\":18,\"isnull\":0},"
												+ " \"3\":{\"titlename\":\"生日\",\"dbfield\":\"Birthday\",\"dbtype\":\"date\",\"dblength\":0,\"isnull\":0},"
												+ " \"4\":{\"titlename\":\"手机号\",\"dbfield\":\"Phone\",\"dbtype\":\"long\",\"dblength\":11,\"isnull\":1},"
												+ " \"5\":{\"titlename\":\"入职日期\",\"dbfield\":\"EntryDate\",\"dbtype\":\"date\",\"dblength\":0,\"isnull\":0},"
												+ " \"6\":{\"titlename\":\"卡号(ICID)\",\"dbfield\":\"ICID\",\"dbtype\":\"string\",\"dblength\":10,\"isnull\":1},"
												+ " \"7\":{\"titlename\":\"岗位\",\"dbfield\":\"Post\",\"dbtype\":\"string\",\"dblength\":0,\"isnull\":1},"
												+ " \"8\":{\"titlename\":\"备注\",\"dbfield\":\"Desc\",\"dbtype\":\"string\",\"dblength\":225,\"isnull\":1}"
												+ " } ";

//----------------命令-------------------------------------------------------------------------------------------------------------------------------------------
	public static final String ERROR_ACTION="{\"err\":%1$s}";
	/**
	 *
	 */
	public static final String ACTION_2="{\"TNUM\":%1$s,\"ACTION\":2,\"ETYPE\":%2$s,\"ENUM\":\"%3$s\"}";
	/**
	 * 升级
	 */
	public static final String ACTION_5="{\"TNUM\":%1$s,\"ACTION\":5,\"HVER\":\"\",\"SVER\":\"\"}";
	/**
	 * 同步卡
	 */
	public static final String ACTION_6="{\"TNUM\":%1$s,\"ACTION\":6,\"RST\":2,\"ENUM\":%2$s,\"ETYPE\":%3$s}";
	/**
	 * 命令8拍照
	 */
	public static final String ACTION_8="{\"TNUM\":%1$s,\"ACTION\":8,\"IMAGE\":\"\"}";
	/**
	 * 命令10实时工况
	 */
	public static final String ACTION_10_R="{\"TNUM\":%1$s,\"ACTION\":10,\"CONDITION\":%2$s}";
	/**
	 * 命令10解锁机
	 */
	public static final String ACTION_10="{\"TNUM\":%1$s,\"FNUM\":%2$s,\"ACTION\":10,\"EOPR\":%3$s}";
	/**
	 * 命令10身份认证
	 */
	public static final String ACTION_10_ID_VERIFICATION="{\"TNUM\":%1$s,\"ACTION\":10,\"SHIELD\":%2$s}";

	/**
	 * 命令3防碰撞报警
	 */
	public static final String ACTION_3_AREA="{\"TNUM\":%1$s,\"ACTION\":3,\"AREAA\":%2$s}";

//-----------内存存储的-------------------------------------------------------------------------------------------------------------------------
	/**
	 * 缓冲中PLC配置Key
	 */
	public static final String CACHE_KEY_PLC_CONFIG="plc_config";

	/**
	 * 缓冲区中用户对plc配置key
	 */
	public static final String CACHE_KEY_PLC_ADMIN_CONFIG="plc_user_config";

	/**
	 * 缓冲区中终端配置表key
	 */
	public static final String CACHE_KEY_PLC_TERM_CONFIG="plc_term_config";

	/**
	 * 内存中,存储sql语句的关键字
	 */
	public static final String CACHE_KEY_GLOBAL_SQL="global_sql";

	/**
	 * plc的故障key(终端上传的原始数据)
	 */
	public static final String CACHE_KEY_PLC_ERR="plc_err";

	/**
	 * plc故障缓存数据(处理终端上传的数据)
	 */
	public static final String CACHE_KEY_PLC_ERR_DATA="plc_err_data";

	/**
	 * db.properties配置key
	 */
	public static final String CACHE_KEY_PROPERTIES="db_properties";

	/**
	 * app用户登录所存储的信息
	 */
	public static final String CACHE_KEY_APP_TOKEN="c_app_token";

	/**
	 * app用户短信验证码信息
	 */
	public static final String CACHE_KEY_APP_VERIFY="c_app_verify";

	/**
	 * 塔机班组认证已完成
	 */
	public static final String CACHE_KEY_APP_CLASSES="c_app_classes";

	/**
	 * 塔机班组认证中
	 */
	public static final String CACHE_KEY_APP_CLASSES_T="c_app_classes_t";

	/**
	 * 终端对应设备
	 */
	public static final String CACHE_KEY_TERM_EQPT="c_term_eqpt";

	/**
	 * 组织对应终端 用于防碰撞
	 */
	public static final String CACHE_KEY_ORG_TERM="c_org_term";

	/**
	 * 终端设定了哪些防碰撞区域
	 */
	public static final String CACHE_KEY_TERM_AREA="c_term_area";

	/**
	 * 终端报警
	 */
	public static final String CACHE_KEY_WARNING="c_warning";

	/**
	 * 终端报修
	 */
	public static final String CACHE_KEY_MAINTAIN="c_maintain";

	/**
	 * 终端上传的插拔卡数据
	 */
	public static final String CACHE_KEY_OFFWORK="c_offwork";

	/**
	 * 取得组织的随机码
	 */
	public static final String CACHE_KEY_ORG_RANDOM="c_org_random";

//	/**
//	 * app过滤关键字
//	 */
//	public static final String[] APP_INVOKE_ARR=new String[]{
			//"/svr/app/login",
//			"/svr/app/register",
//			"/svr/app/sendVerifySms",
//			"/svr/app/VerifySms",
//			"/svr/appEqpt/uploadImg",
//			"/svr/app/uploadImg",
//			"/svr/app/forgetPass",
//			"/svr/app/loginApp",
//			"/svr/app/userReg",
//			"/svr/app/checkVersionUpdate"
//	};


//--------------------------------------关于对象的锁对象--------------------------------------
	/**
	 * 锁机和解锁时,需要同步锁
	 */
	public static final Object LOCK_LOCKOBJECT=new Object();

	/**
	 * 锁图上传
	 */
	public static final Object LOCK_UPIMG=new Object();
}
